<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Tabs - Default functionality</title>
<link type="text/css" href="css/cupertino/jquery-ui-1.8.19.custom.css"
	rel="Stylesheet" />
<link rel="stylesheet" href="css/demos.css">
<link href="css/comm.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-latest.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"></script>
<script type="text/javascript" src="js/schedule.js"></script>
<script>
	$(function() {
		$( "#tabs" ).tabs();
		$( "#tabs" ).tabs({
		   select: function( event, ui ) {
				ui.panel.innerHTML='slkl';
				var name = ui.tab.innerHTML;
				var status;
				ui.panel.innerHTML = '<div align=center><font color=red><b><h1>加载数据中~~<h1></b></font></div>';
				
				if( name == "等待买家付款" ) {
					status = 'WAIT_BUYER_PAY';
				} else if( name == "等待卖家发货" ) {
					status = 'WAIT_SELLER_SEND_GOODS';
				} else {
					status = 'WAIT_BUYER_CONFIRM_GOODS';
				}
				
				$.get("trade.jsp", { status: status }, function(data) {
		 			ui.panel.innerHTML = data;
		 			$( "input:button, input:submit" ).button();
		 		});
			}
		});
		$( "#tabs" ).tabs( "select", 1 );
	});
	
	function aa() {
	}
</script>
</head>
<body>

	<div class="demo">

		<div id="tabs">
			<ul>
				<li><a href="#wait_buyer_pay">等待买家付款</a>
				</li>
				<li><a href="#wait_seller_send">等待卖家发货</a>
				</li>
				<li><a href="#wait_buyer_confirm">已发货</a>
				</li>
			</ul>
			<div id="wait_buyer_pay">	
				buyer_pay			
			</div>
			<div id="wait_seller_send">
				seller_send				
			</div>
			<div id="wait_buyer_confirm">
				buyer_confirm				
			</div>
		</div>

	</div>
	<!-- End demo -->



	<div class="demo-description">
	</div>
	<!-- End demo-description -->

</body>
</html>
